{% extends "../theme/base.html" %}

{% block head %}
<title>{{ postinfo.title }}</title>

<meta name="keywords" content="地图画板 Maplet">
<meta name="description" content="地图画板 Maplet">

{% end %}

{% block zhuti %}

<div class="panel panel-black">

    <div class="panel-heading">

        <h1>{{ postinfo.title }}</h1>


        <div>

            发布者: <a href="/" style="color:#ffffff;">Maplet</a>
            {{ str(postinfo.date).split()[0] }}

            {% if 1== 2 %}
            <span class="split">|</span>
            查看:
            <em id="_viewnum">{{ postinfo.view_count }}</em>
            {% end %}

                       <span class="cmts"><a href="/wiki/_edit/{{ postinfo.uid  }}" class="btn btn-xs btn-warning">
    <span class="glyphicon glyphicon-pencil"></span>
    {{ _('Edit') }}</a></span>
<span class="cmts"><a href="/wiki_man/view/{{ postinfo.uid  }}"
                      class="btn btn-xs btn-danger"> {{ _('Review') }}</a></span>


        </div>

    </div>

    <div class="panel-body">


        <div id="wiki_cnt">
            {% raw unescape(postinfo.cnt_html) %}
        </div>


    </div>
    <div class="panel-footer">
        <div class="row">


            <div class="col-md-6">
                本文链接： <a href="http://www.maplet.org/wiki/{{ postinfo.title }}">{{ postinfo.title }}</a>
            </div>


            <div class="col-md-6" style="text-align: right;">
                <div class="widget_baidu_share">{% module baidu_share() %}</div>
            </div>


        </div>
    </div>
</div>
{% end %}

{% block right %}

{% if userinfo is not None and userinfo.role[2] == '1' %}
<div class="panel panel-black">
    <div class="panel-heading">
        <h3 class="panel-title">
            用户操作
        </h3>
    </div>
    <ul class="list-group">
        <li class="list-group-item"><a href="/post/_add" class="btn btn-small btn-primary">添加文档</a></li>
        <li class="list-group-item"><a href="/post/refresh" class="btn btn-small btn-primary">更新文档</a></li>
    </ul>
</div>
{% end %}

<div class="panel panel-black">
    <div class="panel-heading">
        <h3 class="panel-title">
            最近地图
        </h3>
    </div>

    <ul class="list-group">
                       {% module app_recent_used('m', num=10, userinfo = userinfo) %}

    </ul>

</div>

<div class="panel panel-black">
    <div class="panel-heading">
        <h3 class="panel-title">
            最近文档
        </h3>
    </div>

    <ul class="list-group">

        {% module post_recent(8, with_catalog=False, with_date = False) %}

    </ul>

</div>


{% end %}
